/*
 * Created on 08.08.2006 by leck
 *
 */
package de.devisnik.eidle;

import org.eclipse.core.runtime.Preferences;

import de.devisnik.eidle.screen.IScreen;

public class EidlePreferences {

	public static final String QUIT_ON_MOUSE_DOWN = "quit_on_mouse_down";

	public static boolean isQuitOnMouseDownEnabled() {
		return getPreferences().getBoolean(QUIT_ON_MOUSE_DOWN);
	}

	private static Preferences getPreferences() {
		return EidleActivator.getDefault().getPluginPreferences();
	}

	public static void setQuitOnMouseDownEnabled(final boolean value) {
		getPreferences().setValue(QUIT_ON_MOUSE_DOWN, value);
	}

	public static boolean isScreenEnabled(final IScreen screen) {
		return getPreferences().getBoolean(screen.getClass().getName());
	}

	public static void setScreenDefaultEnablement(final IScreen screen,
			final boolean enablement) {
		getPreferences().setDefault(screen.getClass().getName(), enablement);
	}
}
